package com.main;

/**
 * 支付方式类型枚举
 * Created by 瑱彬 on 2016/5/24.
 */
public enum OrderPayTypeEnums {
    OFFLINE(0,"线下支付"), RELEASE(1,"余额"), ALIPAY(2,"支付宝"), WEIXINPAY(3,"微信支付"), DINPAY(4,"智付");

    private int value;
    private String name;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    OrderPayTypeEnums(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(int value){
        for (OrderPayTypeEnums enums : OrderPayTypeEnums.values()) {
            if(enums.value == value) return enums.name;
        }
        return "";
    }
}
